package com.jf3q.front.controller;

import com.jf3q.common.utils.VodUtils;
import com.jf3q.common.vo.ResultVo;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/video")
public class VideoController {

    @Autowired
    VodUtils vodUtils;

    @GetMapping("/auth")
    @Operation(summary = "获取播放凭证")
    public ResultVo getAuth(String vid){
        String auth = vodUtils.getVideoPlayAuth(vid);
        return ResultVo.success(auth);
    }
}
